<template>
  <div class="position">
    <span class="iconfont position__icon1">&#xe61f;</span>
    北京理工大学国防科技园2号楼10层
    <span class="iconfont position__bell">&#xe628;</span>
  </div>
  <div class="search">
    <span class="search__icon iconfont">&#xe61b;</span>
    <input type="text" placeholder="山姆会员商店优惠商品" class="search__ipt" />
  </div>
  <div class="banner">
    <img
      class="banner__img"
      src="http://www.dell-lee.com/imgs/vue3/banner.jpg"
      alt=""
    />
  </div>
  <div class="icons">
    <div class="icons__item" v-for="item in iconsList" :key="item.desc">
      <img class="icons__item__img" :src="item.imgSrc" alt="" />
      <p class="icons__item__desc">{{ item.desc }}</p>
    </div>
  </div>
  <div class="gap"></div>
</template>
<script>
export default {
  name: "StaticPart",
  setup() {
    const iconsList = [
      {
        imgSrc: "http://www.dell-lee.com/imgs/vue3/超市.png",
        desc: "超市便利",
      },
      {
        imgSrc: "http://www.dell-lee.com/imgs/vue3/菜市场.png",
        desc: "菜市场",
      },
      {
        imgSrc: "http://www.dell-lee.com/imgs/vue3/水果店.png",
        desc: "水果店",
      },
      {
        imgSrc: "http://www.dell-lee.com/imgs/vue3/家居.png",
        desc: "家居时尚",
      },
      {
        imgSrc: "http://www.dell-lee.com/imgs/vue3/医药健康.png",
        desc: "医药健康",
      },
      {
        imgSrc: "http://www.dell-lee.com/imgs/vue3/蛋糕.png",
        desc: "烘焙蛋糕",
      },
      {
        imgSrc: "http://www.dell-lee.com/imgs/vue3/签到.png",
        desc: "签到",
      },
      {
        imgSrc: "http://www.dell-lee.com/imgs/vue3/大牌免运.png",
        desc: "大牌免运",
      },
      {
        imgSrc: "http://www.dell-lee.com/imgs/vue3/红包.png",
        desc: "红包套餐",
      },
      {
        imgSrc: "http://www.dell-lee.com/imgs/vue3/鲜花.png",
        desc: "鲜花绿植",
      },
    ];
    return {
      iconsList,
    };
  },
};
</script>
<style lang="scss" scoped>
@import "../../style/mixins.scss";
@import "../../style/viriables.scss";
.position {
  position: relative;
  padding: 0.16rem 0.24rem 0.16rem 0;
  font-size: 0.16rem;
  line-height: 0.22rem;
  color: $content-fontcolor;
  @include ellipsis;
  .position__icon1 {
    position: relative;
    top: 0.01rem;
    font-size: 0.2rem;
  }
  .position__bell {
    position: absolute;
    top: 0.16rem;
    right: 0;
    font-size: 0.2rem;
  }
}
.search {
  display: flex;
  position: relative;
  margin-bottom: 0.12rem;
  color: #b7b7b7;
  .search__ipt {
    flex: 1;
    padding: 0 0 0 0.35rem;
    line-height: 0.32rem;
    background-color: $ibput-bgcolor;
    font-size: 0.16rem;
    border-radius: 0.16rem;
    border: 0;
    outline: none;
  }
  .search__icon {
    position: absolute;
    left: 0.1rem;
    // top: 0;
    line-height: 0.32rem;
    font-size: 0.2rem !important;
  }
}
.banner {
  height: 0;
  overflow: hidden;
  padding-bottom: 25.4%;
  .banner__img {
    width: 100%;
  }
}
.icons {
  display: flex;
  flex-wrap: wrap;
  padding: 0.2rem 0 0 0;
  .icons__item {
    flex: 20%;
    &__img {
      display: block;
      margin: 0 auto;
      width: 0.4rem;
      height: 0.4rem;
    }
    &__desc {
      text-align: center;
      margin: 0.06rem 0 0.16rem 0;
      color: $content-fontcolor;
    }
  }
}
.gap {
  height: 0.1rem;
  background-color: $content-bgcolor;
  margin: 0 -0.18rem;
}
</style>
